using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Threading;

namespace SpoonStun
{
	class Program
	{
		static void Main(string[] args)
		{
			IPEndPoint serverEndpoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1000);

			StunServer server = new StunServer(1000);

			StunServer client1 = new StunServer();
			client1.AddServer(serverEndpoint);
			client1.Register();

			StunServer client2 = new StunServer();
			client2.AddServer(serverEndpoint);
			client2.Register();

			// Test
			Thread.Sleep(1000);
			client1.PeerWith(client2.GlobalEndPoint);

			Thread.Sleep(1000);
			Console.ReadLine();
		}
	}
}
